package com.web.datasource;

import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;

/**
 * Created with IntelliJ IDEA.
 * User: lxf
 * Date: 2016/4/26
 * Time: 11:45
 * To change this template use File | Settings | File Templates.
 */
public class DynamicDataSource extends AbstractRoutingDataSource {

    @Override
    protected Object determineCurrentLookupKey() {
        return DataSourceContextHolder.getType();
    }

}
